<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="__PUBLIC__/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/lib/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="__PUBLIC__/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>评论管理</title>
</head>
<body>
<nav class="breadcrumb"><i class="iconfont">&#xf012b;</i> 首页 <span class="c-gray en">&gt;</span> 评论管理 <span class="c-gray en">&gt;</span> 评论中心 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>
<div class="pd-20">
  <div class="text-c"> 日期范围：
    <input type="text"  id="datemin" class="input-text Wdate" style="width:120px;">
    -
    <input type="text"  id="datemax" class="input-text Wdate" style="width:120px;">
    <input type="text" class="input-text" style="width:250px" placeholder="输入会员名称、电话、邮箱" id="" name=""><button type="submit" class="btn btn-success" id="" name=""><i class="icon-search"></i> 搜用户</button>
  </div>
  <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="icon-trash"></i> 批量删除</a> <a href="{:U('admin/comment/questionadd')}"  class="btn btn-primary radius"><i class="icon-plus"></i> 添加提问</a></span> <span class="r">共有数据：<strong>88</strong> 条</span> </div>
  <table class="table table-border table-bordered table-hover table-bg table-sort">
    <thead>
      <tr class="text-c">
        <th width="25"><input type="checkbox" name="" value=""></th>
        <th width="80">ID</th>
        <th width="100">提问者</th>
        <th width="40">浏览量</th>
        <th width="90">回答数</th>
        <th width="150">投票数量</th>
        <th width="">标题</th>
        <th width="130">提问时间</th>
        <th width="70">详细</th>
        <th width="100">操作</th>
      </tr>
    </thead>
    <tbody>
      <?php 
        foreach ($res as $key => $value) {
         ?>
            <tr class="text-c">
              <td><input type="checkbox" value="{$value['id']}" name="questionid[]"></td>
              <td>{$value['id']}</td>
              <td><u style="cursor:pointer" class="text-primary" onclick="user_detail_show({$value['userid']},'750','600','{$value['username']}','{:U('admin/user/userdetail',array('uid'=>$value['userid']))}')">{$value['username']}</u></td>
              <td>{$value['view']}</td>
              <td>{$value['answer_num']}</td>
              <td>{$value['vote_num']}</td>
              <td>{$value['title']}</td>
              <td>{$value['create_time']}</td>
              <td class="user-status"><a href="javascript:;" onClick="question_detail_scan('10001','600','240','修改密码','{:U('admin/user/userdetail')}')" >查看详情</a></td>
              <td class="f-14 user-manage"><a style="text-decoration:none" onClick="user_stop(this,'10001')" href="javascript:;" title="停用"><i class="icon-hand-down"></i></a> <a title="编辑" href="{:U('admin/comment/questionupdate',array('qid'=>$value['id']))}"  class="ml-5" style="text-decoration:none"><i class="icon-edit"></i></a>  <a title="删除" href="javascript:;" onclick="question_del(this,{$value['id']})" class="ml-5" style="text-decoration:none"><i class="icon-trash"></i></a></td>
            </tr>
         <?php
        }
       ?>
        
    </tbody>
  </table>
  
</div>
<script type="text/javascript" src="__PUBLIC__/lib/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/layer1.8/layer.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/laypage/laypage.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/H-ui.js"></script>  
<script type="text/javascript" src="__PUBLIC__/js/H-ui.admin.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/H-ui.admin.doc.js"></script>
<script type="text/javascript">
$('.table-sort').dataTable({
	"lengthMenu":false,//显示数量选择 
	"bFilter": false,//过滤功能
	"bPaginate": false,//翻页信息
	"bInfo": false,//数量信息
	"aaSorting": [[ 1, "desc" ]],//默认第几个排序
	"bStateSave": true,//状态保存
	"aoColumnDefs": [
	  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
	  {"orderable":false,"aTargets":[0,8,9]}// 制定列不参与排序
	]
});
</script> 
<script>

//异步信息删除
/*用户-删除*/
function question_del(obj,id){
  layer.confirm('确认要删除吗？',function(index){
    var thisObj = $(obj);
    var layerObj = layer;
    var questionid = id;
    $.ajax({
       url: '{:U("admin/comment/questiondelete")}',
       type: 'POST',
       dataType: 'json',
       data: {question_id: questionid},
       success:function(data){
           thisObj.parents("tr").remove();
           layerObj.msg('已删除!',1);
       },
       error:function(){

       },
     })
      
   
  });
}


//用户详情展示
function user_detail_show(id,w,h,title,url){
  layer_show(w,h,title,url);
}

/*评论详情信息展示*/
function question_detail_scan(id,w,h,title,url){
  layer_show(w,h,title,url);
}


$("#Text2").click(function (e) {
  var ths = this;
  calendar.show({
    id: this, ok: function () {
      alert(ths.value);
    }
  });
});
</script>


</body>
</html>